let id = getQueryString('productid')
console.log(id);
let str = ''
let comStr = ''
let container = document.querySelector('.container')
let discuss = document.querySelector('.discuss')
fetch('http://chst.vip:1234/api/getmoneyctrlproduct?productid=' +id)
    .then(body => body.json())
    .then(res => {
        console.log(res)
        let regExp = /(?<=imgurl=)[^'"]*/;
        let urls = res.result[0].productImgSm.match(regExp)
        str += `<div class="title">${res.result[0].productName}</div>
    <div class="tip"><span>${res.result[0].productFrom} | ${res.result[0].productTime}</span><span>${res.result[0].productTips}</span></div>
    <div class="content">
        <p><img src=${urls} alt="">${res.result[0].productInfo} ${res.result[0].productInfo2}</p>
    </div>
    <div class="bigImg">
        <img src=${urls} alt="">
    </div>
    <div class="city">
    ${res.result[0].productCity}
    </div>`
        comStr += `${res.result[0].productComment}`
        container.innerHTML = str
        discuss.innerHTML = comStr
    })
